<template>
  <div class="nav-bar">
    <!-- 滑动标签页 -->
    <van-tabs title-active-color="#fb7299" color="#fb7299" line-width="30px">
      <van-tab v-for="(item,index) in options" :key="index" :title="item.name">
        <home-page v-if="index === 0" :NavName="item.name"></home-page>
        <secondary-page v-if="index !== 0" :NavName="item._id"></secondary-page>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import HomePage from './HomePage.vue'
import SecondaryPage from './SecondaryPage.vue'
export default {
  props: ['options'],
  components: {
    HomePage,
    SecondaryPage
  },
  data () {
    return {}
  },
  methods: {}
}
</script>

<style lang="scss">
.nav-bar {
  .van-tab {
    padding: 0 14px !important;
    box-sizing: border-box;
    border-bottom: 1px solid #f8f8f8;
    font-size: 12px;
  }
  .van-tabs__wrap {
    height: 30px !important;
    padding: 0px 12px 0 0;
  }
}
</style>
